<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
    <style>
        .div {
            width: 300px;
            height: 300px;
            background-color: rgb(155, 47, 47);
            position: absolute;
            top: 10px;
            left: 30px;
            /* transition: left 3s linear 0s,background-color 3s linear 0s;
                建议使用此方式
             */
             transition: all 2s ;
        }
        .div:active{
            left:1000px;
            background-color: rgba(12, 187, 218, 0.678);
        }
        .item {
            overflow: hidden;
            width: 100px;
            margin: 100px auto;
            height: 45px;
            list-style: none;
            transition: height 0.5s linear 0s;
        }
        .item ,.item li {
            display: block;
            
        }
       .item:hover {
           height: 200px;
       }
    </style>
<body>
    <div class="div"></div>
            <ul class="item">
                <h3>物品</h3>
                <li>111</li>
                <li>222</li>
                <li>333</li>
            </ul>
</body>
<script>
    var div = document.getElementsByClassName('div')[0];

</script>
</html>